package eteam.aps.service.impl;

import eteam.aps.mapper.ParamFromWindowingMapper;
import eteam.aps.mapper.UserMapper;
import eteam.aps.model.vo.ParamFromWindowingVo;
import eteam.aps.model.vo.UserVo;
import eteam.aps.service.UserService;
import eteam.aps.systeminterface.model.vo.QueryInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 用户业务逻辑层
 *
 * @author WMT
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Autowired
    private ParamFromWindowingMapper paramFromWindowingMapper;

    @Override
    public List<UserVo> selectAll(Map<String, Object> map) {
        map.put("personType",UserVo.PERSON_TYPE_ROLE);
        map.put("state", QueryInfoVo.STATE_ENABLE);
        return userMapper.selectAll(map);
    }

    @Override
    public List<ParamFromWindowingVo> selectPfromSo() {
        return paramFromWindowingMapper.selectPfromSo(QueryInfoVo.STATE_ENABLE);
    }


}